<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id='app'>
			<p>{{name}}</p>
			<button v-if="flag" v-on:click="handleClick">Click me</button>
		</div>

	</body>
	<script>
		new Vue({
			el: '#app',
			data: {
				name: '萧曵',
				flag: true
			},
			methods: {
				handleClick: function() {
					alert("单击按钮");
				}
			}
		})
	</script>
</html>
